<template>
  <view>
    <!-- 轮播图区域 -->
    <swiper
      :indicator-dots="true"
      :autoplay="true"
      :interval="3000"
      :duration="1000"
      :circular="true"
      style="hieght: 330rpx"
    >
      <!-- 循环渲染轮播图的 item 项 -->
      <swiper-item v-for="(item, i) in swiperList" :key="i">
        <view class="swiper-item">
          <!-- 动态绑定图片的 src 属性 -->
          <navigator
            class="swiper-item"
            :url="'/pages/goods_detail/index?goods_id=' + item.goods_id"
          >
            <image style="width: 100%" :src="item.image_src"></image>
          </navigator>
        </view>
      </swiper-item>
    </swiper>
  </view>
</template>

<script>
export default {
  props: {
    swiperList: {
      type: Array,
    },
  },
};
</script>

<style>
</style>